package com.winit.schedule.core.protocol.command;

import com.winit.schedule.core.model.AssignedTask;
import com.winit.schedule.core.protocol.AbstractCommandBody;
import com.winit.schedule.core.repository.constants.TaskStatus;
import com.winit.schedule.core.repository.entity.TaskRunnerEntity;

public class CompleteTaskRequest extends AbstractCommandBody {

    private AssignedTask     task;

    private String           taskTrackerUuid;

    private TaskRunnerEntity taskRunner;

    private TaskStatus       taskStatus;

    private String           exception;

    public CompleteTaskRequest(){

    }

    public AssignedTask getTask() {
        return task;
    }

    public void setTask(AssignedTask task) {
        this.task = task;
    }

    public String getTaskTrackerUuid() {
        return taskTrackerUuid;
    }

    public void setTaskTrackerUuid(String taskTrackerUuid) {
        this.taskTrackerUuid = taskTrackerUuid;
    }

    public TaskRunnerEntity getTaskRunner() {
        return taskRunner;
    }

    public void setTaskRunner(TaskRunnerEntity taskRunner) {
        this.taskRunner = taskRunner;
    }

    public TaskStatus getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(TaskStatus taskStatus) {
        this.taskStatus = taskStatus;
    }

    public String getException() {
        return exception;
    }

    public void setException(String exception) {
        this.exception = exception;
    }

    public String toString() {
        return "TaskCompleteRequest[taskItem:" + task.getTaskItems() + ", taskTrackerUuid:" + taskTrackerUuid
               + ", taskRunnerUuid:" + taskRunner.getTaskRunnerUuid() + ", taskStatus:" + taskStatus + "]";
    }

}
